#!/bin/bash

echo "8192 2100000 8400000" >/proc/sys/net/ipv4/tcp_mem
echo "8192 2100000 8400000" >/proc/sys/net/ipv4/tcp_rmem
echo "8192 2100000 8400000" >/proc/sys/net/ipv4/tcp_wmem

LIENTS_IFACE="eth0"

ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100

# Careful, as this will erase any other preexisting entries
iptables -t mangle -F
#iptables -t mangle -A PREROUTING -i $CLIENTS_IFACE -p tcp -j TPROXY --on-port 5000 --tproxy-mark 1
iptables -t mangle -A PREROUTING -p tcp -d 192.168.233.41,127.0.0.1,192.168.1.1 -j ACCEPT
#iptables -t mangle -A PREROUTING -p tcp -j TPROXY --on-port 1080 --tproxy-mark 1
